import { FormSchema } from '@/components/Form';
import { buildUUID } from '@/utils/uuid';

const uuid = buildUUID();
export let imgUuid = uuid;
console.log('imgUuid---------------------------', imgUuid);

export function changeValue(val) {
  console.log('改变了batchId-----------------', val);
  imgUuid = val;
}

export const schemasDriverPhoto: FormSchema[] = [
  {
    field: 'driverCar_driverPhoto',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    defaultValue: [
      // 'http://minio.es-jia.net/eslogispub/shippingOrder/5250bb8d5516a938505c298b5e6630b0.jpg',
    ],
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        maxNumber: 1,
        label: 'driverCar_driverPhoto',
        batchId: imgUuid,
      },
      disabled: false,
    },
  },
];

export const schemasCarPhoto: FormSchema[] = [
  {
    field: 'driverCar_carPhoto',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    defaultValue: [
      // 'http://minio.es-jia.net/eslogispub/shippingOrder/5250bb8d5516a938505c298b5e6630b0.jpg',
    ],
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        maxNumber: 1,
        label: 'driverCar_carPhoto',
        batchId: imgUuid,
      },
    },
  },
];

export const schemasValiate1: FormSchema[] = [
  {
    field: 'driverCar_idCardFront',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    defaultValue: [
      // 'http://minio.es-jia.net/eslogispub/shippingOrder/5250bb8d5516a938505c298b5e6630b0.jpg',
    ],
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_idCardFront',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];
export const schemasValiate2: FormSchema[] = [
  {
    field: 'driverCar_idCardBack',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_idCardBack',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];
export const schemasValiate3: FormSchema[] = [
  {
    field: 'driverCar_driverLicense',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_driverLicense',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];
export const schemasValiate4: FormSchema[] = [
  {
    field: 'driverCar_drivingPermit',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_drivingPermit',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];

export const schemasValiate5: FormSchema[] = [
  {
    field: 'driverCar_operationalQualifications',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_operationalQualifications',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];

export const schemasValiate6: FormSchema[] = [
  {
    field: 'driverCar_annualCheckUp',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_annualCheckUp',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];

export const schemasValiate7: FormSchema[] = [
  {
    field: 'driverCar_carFront',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_carFront',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];

export const schemasValiate8: FormSchema[] = [
  {
    field: 'driverCar_carSide',
    component: 'ImageUpload',
    label: '',
    colProps: {
      span: 8,
    },
    required: false,
    componentProps: {
      uploadParams: {
        configCode: 'eslogis_order',
        label: 'driverCar_carSide',
        maxNumber: 1,
        batchId: imgUuid,
      },
    },
  },
];
